import 'package:flutter/material.dart';
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
import 'package:whale/pages/means/model/area.dart';
import 'package:whale/pages/means/model/means_model.dart';
import 'widgets/selection/model.dart';

class MeansState {
  late TextEditingController inputCtrl;
  String? keywords;
  late List<String> titles;
  late TabController tabCtrl;
  final GlobalKey titleKey = GlobalKey();
  String? reportType;

  List<String>? industryData;

  late List<SelectionModel> selectionTitles;
  List? selectList;
  List<AreaModel>? areaData;
  List<String>? scopeData;

  late RefreshController rc;
  int pageIndex = 1;
  Map? fitlersList;
  Map<String, List<MeansModel>> data = {};

  Map<String, String> filterData = {};
}

class FiltersModel {
  String code;
  String name;
  FiltersModel({
    required this.code,
    required this.name,
  });
  factory FiltersModel.fromJson(Map<String, dynamic> json) => FiltersModel(
        code: json['code'].toString(),
        name: json['name'].toString(),
      );
  Map<String, dynamic> toJson() => {
        'code': code,
        'name': name,
      };
}
